From: Juanma Barranquero Date: Fri, 8 Jun 2007 19:56:24 +0000 (+0000) Subject: (STRING_SET_UNIBYTE): Return the canonical empty unibyte string, if appropriate. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~18525 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6510b79b562ae11e257e6db1111cdc4fc01c7c99;p=emacs.git (STRING_SET_UNIBYTE): Return the canonical empty unibyte string, if appropriate. (empty_unibyte_string, empty_multibyte_string): New externs. (empty_string): Remove extern. --- diff --git a/src/lisp.h b/src/lisp.h index a7072d02174..d380ba0d049 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -701,7 +701,10 @@ extern int string_bytes P_ ((struct Lisp_String *)); #endif /* not GC_CHECK_STRING_BYTES */ /* Mark STR as a unibyte string. */ -#define STRING_SET_UNIBYTE(STR) (XSTRING (STR)->size_byte = -1) +#define STRING_SET_UNIBYTE(STR) \ + do { if (EQ (STR, empty_multibyte_string)) \ + (STR) = empty_unibyte_string; \ + else XSTRING (STR)->size_byte = -1; } while (0) /* Get text properties. */ #define STRING_INTERVALS(STR) (XSTRING (STR)->intervals + 0) @@ -3060,7 +3063,8 @@ extern void syms_of_frame P_ ((void)); /* defined in emacs.c */ extern Lisp_Object decode_env_path P_ ((char *, char *)); extern Lisp_Object Vinvocation_name, Vinvocation_directory; -extern Lisp_Object Vinstallation_directory, empty_string; +extern Lisp_Object Vinstallation_directory; +extern Lisp_Object empty_unibyte_string, empty_multibyte_string; EXFUN (Fkill_emacs, 1); #if HAVE_SETLOCALE void fixup_locale P_ ((void));